import request from "@/utils/request";

/**
 * 获取微信JSapi授权
 * @param {*} params
 * @returns
 */
export function wxJsApi(params) {
  return request({
    url: "/tduck-api/wx/jsapi/signature",
    method: "get",
    params,
  });
}

export function wxAuthorization(params) {
  return request({
    url: "/tduck-api/wx/jsapi/authorization/url",
    method: "get",
    params,
  });
}

export function wxAuthorizationUserInfo(params) {
  return request({
    url: "/tduck-api/wx/jsapi/authorization/user/info",
    method: "get",
    params,
  });
}

export function getWxUserInfoByOpenid(params) {
  return request({
    url: "/tduck-api/wx/jsapi/getWxUserInfoByOpenid",
    method: "get",
    params,
  });
}
